Server resource description test

CoAP working steps: The HTTP server receives the http request address from the client; CoAP determines the resource requested by the client based on the address and calculates the data data; the data is passed to the CoAP engine; CoAP encapsulates the data according to the data format and hands it to the HTTP server , And finally sent to customers through TCP / IP protocol. According to the three main functions of the above indicator, the resource description test acquires temperature, acquires humidity, acquires shelf life, acquires historical warning data, sets the temperature alarm threshold, acquires all resources of the indicator, and returns the result of responding to CoAP requests. The general format is as follows: The returned data obtained from the remaining shelf life of the device is "type": "sl", "value": 5, indicating that the remaining shelf life of the aquatic product predicted by the indicator is 5d.

By transplanting the operating system Contiki to the indicator to complete the support for embedded Web services. Contiki natively supports TCP / IP and multi-tasking environments. It only requires a few thousand words of flash memory and a few hundred bytes of memory to run the operating system. Support for CoAP programming has been added to the latest version of contiki 2.5, which makes it very easy to publish CoAP resources. The C language code of the / echo resource issued by the indicator is as follows: After configuring the reader to the network adapter of the PC, use Web The browser can directly access the indicator.

In the experiment, the time required to access different numbers of indicators was tested using the Firefox11 browser. Indicator quantity resource The shelf life indicator is powered by a 2000mAh lithium battery. With the LCD screen turned off, the experiment estimates the relationship between accessing sl resources and the remaining working time of the power supply. The indicator responds to 6 web requests per hour on average, so a 2000mAH capacity lithium battery can last about 100 days.

Front Terminal Lead Acid Battery

Front End Terminal Battery,High Performance Battery,Fit 23-Inch Rack Battery,Fit 19-Inch Cabinet Battery

Wolong Electric Group Zhejiang Dengta Power Source Co.,Ltd , https://www.wldtbattery.com